> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-dependabot-npm_and_yarn-npm_and_yarn-e04d5d616f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Start converting documents with SuperDoc API in 5 minutes

## Get Started with SuperDoc API

Follow this guide to make your first API request and convert a DOCX file to PDF.

### Prerequisites

Before you begin, you'll need:

* An API key (get one at [dashboard.superdoc.dev](https://dashboard.superdoc.dev))
* A DOCX file to convert
* `curl` or your preferred HTTP client

## Step 1: Get Your API Key

<Steps>
  <Step title="Sign Up">
    Create a free account at
    [dashboard.superdoc.dev](https://dashboard.superdoc.dev)
  </Step>

  <Step title="Generate API Key">
    Navigate to the API Keys section and create a new key
  </Step>

  <Step title="Copy Your Key">
    Copy your API key. It will look like: `sd_live_pk_...`
  </Step>
</Steps>

<Warning>
  Keep your API key secure and never commit it to version control. Use
  environment variables in production.
</Warning>

## Step 2: Make Your First Request

### Using cURL

```bash
curl -X POST https://api.superdoc.dev/v1/convert?format=pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@path/to/your/document.docx" \
  -o converted.pdf
```

### Using JavaScript

```javascript
const FormData = require("form-data");
const fs = require("fs");
const fetch = require("node-fetch");

const form = new FormData();
form.append("file", fs.createReadStream("document.docx"));

const response = await fetch("https://api.superdoc.dev/v1/convert?format=pdf", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    ...form.getHeaders(),
  },
  body: form,
});

const pdfBuffer = await response.buffer();
fs.writeFileSync("converted.pdf", pdfBuffer);
```

### Using Python

```python
import requests

with open('document.docx', 'rb') as f:
    files = {'file': ('document.docx', f, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document')}
    headers = {'Authorization': 'Bearer YOUR_API_KEY'}

    response = requests.post(
        'https://api.superdoc.dev/v1/convert?format=pdf',
        headers=headers,
        files=files
    )

with open('converted.pdf', 'wb') as f:
    f.write(response.content)
```

## Step 3: Handle the Response

### Success Response

When successful, the API returns:

* **Status Code**: `200 OK`
* **Content-Type**: `application/pdf`
* **Body**: The converted PDF file as binary data

### Error Responses

```json
{
  "code": "INVALID_FILE_TYPE",
  "error": "Bad Request",
  "message": "Only DOCX files are supported",
  "requestId": "req_abc123"
}
```

<Accordion title="Common Error Codes">
  * `MISSING_AUTH`: No API key provided - `INVALID_API_KEY`: Invalid or expired
    API key - `INVALID_FILE_TYPE`: File is not a DOCX - `FILE_TOO_LARGE`: File
    exceeds 25MB limit - `RATE_LIMIT_EXCEEDED`: Too many requests
</Accordion>

## What's Next?

<CardGroup cols={2}>
  <Card title="Explore API Reference" icon="book" href="/api-reference/introduction">
    Deep dive into all available endpoints and options
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/concepts/error-handling">
    Learn how to handle errors gracefully
  </Card>

  <Card title="Rate Limits" icon="gauge" href="/rate-limits">
    Understand rate limits and best practices
  </Card>

  <Card title="SDKs" icon="code" href="/sdks/overview">
    Use our official SDKs for easier integration
  </Card>
</CardGroup>
